//
//  ZSPicture.swift
//  ZSWeibo
//
//  Created by zsj1992 on 16/4/14.
//  Copyright © 2016年 ichange. All rights reserved.
//

import UIKit

//图片模型!!!什么是模型??-->根据文档,搞成一个带了picture的url的模型
class ZSPicture: NSObject {

    var thumbnail_pic:String?

    init(dic:[String:String]) {
        super.init()
        //字典转模型
        self.setValuesForKeysWithDictionary(dic)
    
    }

    
    
    override func setValue(value: AnyObject?, forKey key: String) {
    
        let s = value as! String
        
       let ss = s.stringByReplacingOccurrencesOfString("thumbnail", withString: "bmiddle")

        super.setValue(ss, forKey: key)
    
    }
    
    
    //过滤不需要的字段
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
}

